<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
#macro ( genericTree $somelist ) 
#foreach ( $some in $somelist )
<option value="$!some.id">
#if($!some.level>0)
#foreach($count in [-1..$!some.level])&nbsp;#end #end $!some.className</option>
#genericTree($some.childs) 
#end 
#end
<!--[if IE]>
<style type="text/css">
.input{behavior: url($!webPath/resources/style/common/css/ie-css3.htc);}
</style>
<![endif]-->
<link href="$!webPath/resources/style/system/manage/$!{config.websiteCss}/template.css"  rel="stylesheet" type="text/css"/>
<script src="$!webPath/resources/js/jquery-1.8.3.min.js"></script>
<script src="$!webPath/resources/js/jquery.shop.common.js"></script>
<script src="$!webPath/resources/js/jquery.poshytip.min.js"></script>
<script>
//
function ajax_update(id,fieldName,obj,value){
   var val;
   if(value==undefined){
	 val=jQuery(obj).val();
   }else val=value; 
   jQuery.ajax({type:'POST',
	              url:'$!webPath/admin/goods_ajax.htm',
				  data:{"id":id,"fieldName":fieldName,"value":val},
				beforeSend:function(){
				  
				},
			   success:function(data){
	             if(val==""){
				   jQuery(obj).attr("src","$!webPath/resources/style/system/manage/blue/images/"+data+".png");
				 }else{
				   jQuery(obj).val(val);
				 }    
				 if(value!=undefined){
				   jQuery(obj.parentNode.parentNode).remove();
				 }
              }
	    });
}
</script>
</head>
<body scroll="yes">
<div class="cont">
  <h1 class="seth1">总商品列表</h1>
  <div class="settab"> 
	<span class="tab-one"></span> <span class="tabs"> 
	<a href="$!webPath/admin/goods_list.htm" class="this">商品列表</a> |
	<a href="$!webPath/admin/goods_list.htm">待审核</a>|

	<a href="$!webPath/admin/goods_outline.htm">审核未通过</a>
	</span> 
	<span class="tab-two"></span>	</div>
	<form name="queryForm" id="queryForm" action="" method="post">
    <div class="allmem_search">
      <ul>
        <li><span>
        <select>
  			<option selected value="">商品名称</option>
  			<option value="">供应商</option>      
        </select>
        </span> <span class="allmen size4">
          <input name="goods_name" type="text" id="goods_name" />
          </span> 
          <span class="size6">
          <select>
  			<option selected value="">所属分类</option>
  			<option value="">分类A</option>
  			<option value="">分类B</option>
  			<option value="">分类C</option>      
        </select></span>
          <span>库存</span>
           <span class="size5">
          <input name="goods_name" type="text" id="goods_name" /> -
          <input name="goods_name" type="text" id="goods_name" />
          </span>
          <br /><br />
          <select name="goods.goods_brand.id" id="goods.goods_brand.id">
          <option selected value="">创建时间</option>
          <option value="">更新日期</option>
          </select>
          <span class="size6">
          <input style="width: 80px;" name="goods_name" type="text" id="goods_name" /> -
          <input style="width: 80px;" name="goods_name" type="text" id="goods_name" />
          </span>
          <span>价格</span>
          <span class="size5">
          <input name="goods_name" type="text" id="goods_name" /> -
          <input name="goods_name" type="text" id="goods_name" />
          </span>
         
          
          <span class="btn_search">
          <input name="" type="button"  value="搜索" style="cursor:pointer;" onclick="query();"/>
        </span>
        <span class="btn_search">
          <input name="" type="reset"  value="重置" style="cursor:pointer;"/>
        </span>
         </li>
      </ul>
    </div>
  </form>
  <div class="operation">
    <h3>友情提示</h3>
    <ul>
      <li>上架商品，在商城前台所有访客均可查看，管理员和卖家都可以设置商品上架状态</li>
      <li>违规商品，管理员根据商城访客举报结合实际情况设定违规，违规商品前台不可显示，只能管理员能取消违规</li>
    </ul>
  </div>
  <form name="ListForm" id="ListForm" action="" method="post">
    <div class="brandtable">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="brand_table">
        <tr style="background: #if($!config.websiteCss=='blue') #2A7AD2 #end 
      #if($!config.websiteCss=='black')#333 #end; height:30px; color:#FFF">
          <td width="3%">&nbsp;</td>
          <td width="10%">分类</td>
          <td width="10%">商品</td>
          <td width="10%">供应商</td>
          <td width="6%">供应价</td>
          <td width="6%">销售价</td>
          <td width="6%">库存</td>
          <td width="6%" align="center">样品库存</td>
          <td width="6%" align="center">销量</td>
          <td width="6%" align="center">浏览</td>
          <td width="15%" align="center">日期</td>
          <td width="6%" align="center">排序</td>
          <td width="10%" align="center">操作</td>
        </tr>
     
     #foreach($oo in $list)
					<tr>
					  <td width="3%">&nbsp;<input type="checkbox"></td>
						
						<td width="10%">$!{oo.fenlei}</td>
					
						
						<td width="10%">$!{oo.shuiliaopian} <span style="color: red">已质检  已锁定</span></td>
						<td width="10%">$!{oo.gongyigshang}</td>
						<td width="6%">$!{oo.gongyingjia}</td>
						<td width="6%">$!{oo.xiaoshoujia}</td>
						
						<td width="6%">$!{oo.kucun}</td>
						<td width="6%">$!{oo.liulan}</td>
						<td width="6%">$!{oo.zhuangtai}</td>
						<td width="6%">$!{oo.liuyangpin}</td>

						<td width="10%">$!{oo.riqi}</td>

						<td width="6%">$!{oo.paixu}</td>

						<td width="15%" style="color: red">修改 &nbsp;上架&nbsp;日志 &nbsp;锁定</td>
						<td></td>
					</tr>
					#end
     
     
     
     
     
     
      #foreach($obj in $objs)
        <tr>
          <td align="center"><input name="checkbox" type="checkbox" id="checkbox" value="$!obj.id" /></td>
          <td><label>
            <textarea name="textarea" cols="40" rows="3"  title="可编辑" onblur="ajax_update('$!obj.id','goods_name',this)">$!obj.goods_name</textarea>
          </label></td>
          <td>$!obj.goods_brand.name</td>
          <td>$!obj.gc.className</td>
          <td>$!obj.goods_store.store_name</td>
          #if($!obj.goods_status==0)
           #set($goods_status="上架")
          #end
          #if($!obj.goods_status==1)
           #set($goods_status="仓库中")
          #end
          #if($!obj.goods_status==-1)
           #set($goods_status="已下架")
          #end
          #if($!obj.goods_status==-2)
           #set($goods_status="违规下架")
          #end
          <td>$!goods_status</td>
          <td align="center"><img onclick="ajax_update('$!obj.id','store_recommend',this)" src="$!webPath/resources/style/system/manage/blue/images/$!{obj.store_recommend}.png" width="25" height="21" border="0" style="cursor:pointer;" title="特别推荐后在首页显示"/></td>
          <td align="center"><img onclick="ajax_update('$!obj.id','goods_status',this,'-2')"  src="$!webPath/resources/style/system/manage/blue/images/weig.jpg"  border="0" style="cursor:pointer;" title="可编辑"/> </td>
          <td align="center">$!obj.goods_click</td>
          <td class="ac8" align="center"><a href="$!webPath/goods.htm?id=$!obj.id" target="_blank">查看</a></td>
        </tr>
     #end
		<tr>
        <td align="center"><input type="checkbox" name="all" id="all" value="" onclick="selectAll(this)"/>
          <input name="mulitId" type="hidden" id="mulitId" /></td>
        <td colspan="2" class="bdel">
		<span class="sp1">全部</span><span class="sp2">
          <div class="shop_btn_del shopbtn">
            <input name="" type="button" value="删除" onclick="cmd('$!webPath/admin/goods_del.htm');" style="cursor:pointer;" />
          </div>
          </span>		  </td>
        <td colspan="7"></td>
      </tr>
    </table>
	  <div class="fenye" align="right">
       <span id="queryCondition" style="display:none">
		   #foreach($sm in $sms)
     <input name="$!sm.key" id="$!sm.key" type="hidden" value="$!sm.value"/>
		   #end
	 </span>
	   <input name="currentPage" type="hidden" id="currentPage" value="$!currentPage" />
	   $!gotoPageFormHTML </div>
    </div>
  </form>
</div>
</body>
</html>
